<template>
  <div class="main">
    <!-- 菜单 -->
    <el-container class="main-content">
      <!-- 导航菜单 -->
      <el-aside :width="Fold?'50px':'210px'"><main-menu :isFold="Fold"></main-menu></el-aside>
      <!-- 右边 -->
      <el-container>
        <el-header>
          <main-header @fold-change="foldchangeClick"></main-header>
        </el-header>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script lang="ts" setup>
import mainMenu from "@/components/main-menu/mian-menu.vue"
import mainHeader from "@/components/main-header/main-header.vue"
import { localCache } from "@/utils/cache"
import { LOGIN_TOKEN } from "@/global/constants"
import { useRouter } from "vue-router"
import mainHeaderVue from "../../components/main-header/main-header.vue"
import {ref} from "vue"
const Fold=ref<boolean>(false)
const router = useRouter()
// function handleExitClcick() {
//   localCache.removeCache(LOGIN_TOKEN)
//   router.push("/login")
// }
function foldchangeClick(isFold:boolean){
    // console.log(isFold)
    Fold.value=isFold
}
</script>
<style lang="less" scoped>
.main {
  height: 100%;
  // color: red;
}
.main-content {
  height: 100%;
  .el-aside {
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 200px;
    text-align: left;
    cursor: pointer;
    background-color: #001529;
    scrollbar-width: none; /* firefox */
    -ms-overflow-style: none; /* IE 10+ */
    transition: width 0.3s ease;
    &::-webkit-scrollbar {
      display: none;
    transition: width .3s ease;
    }
  }
  // .el-header {
  //   // background-color: skyblue;
  // }
  .el-main {
    background-color: #f0f2f5;
  }
}
</style>
